export default {
	components: {
		resumeDetail: () => import("../../../component/resumeDetail/index.vue")
	},
	data() {
		return {
			tableData: [
				/* {
					username: '张三',									//会员名称
					telnum: '13434343434',								//手机号码
					u1nick: '会飞的鱼',									//上一级会员
					u2nick: 'zzz',										//上二级会员
					u3nick: '哈哈哈',									//上三级会员
					createTime: '2020-6-11 12:00',						//注册时间
					updateTime: '2020-7-11 12:00',						//认证时间
					total: 66,											//发放积分
					renz: true,											//已认证
				} */
			],
			total: 0,
			rewardIntegral: 0,										//活动奖励积分
			loading: false,
			pagenum: 1,
			pagesize: 10,
			peoples: 0,											//人数
			dialogVisible: false,									//是否显示简历模板
			userid: '',												//当前会员的userid
			nickName:'',											//当前会员姓名
		}
	},
	created() {
		this.getTableData();
	},
	methods: {
		getTableData() {
			this.$ceshiAxios.post('/v1/common/activityAward',{pageNum: this.pagenum,pageSize: this.pagesize}).then(res => {
				console.log(res);
				if(res.data.code === 1){
					let result = res.data.data;
					this.tableData.splice(0);
					this.tableData = result.activityAwardRequestList;
					this.peoples = result.getNew;
					this.rewardIntegral = result.activityReward;
					this.total = Number(result.totalnum);
				}else{
					this.$message({
						message: res.data.message,
						type: 'warning'
					})
				}
			})
		},
		handleClick(row,type){
			console.log(row);
			if(type == 0){
				this.userid = row.userid;
				this.nickName = row.username;
			}else{
				this.userid = row['userid'+type];
				this.nickName = row['u' + type + 'nick'];
			}
			this.dialogVisible = true;
		},
		// 分页
		handleCurrentChange(val) {
			this.pagenum = val;
			this.getTableData();
		},
		handleSizeChange(val) {
			this.pagenum = 1;
			this.pagesize = val;
			this.getTableData();
		},
	}
}